Skip to content

Instantly share code, notes, and snippets.

@matt2005
matt2005 / lambda_function.py
Last active March 12, 2026 23:54 — forked from awarecan/lambda_function.py
Alexa Smart Home Skill Adapter for Home Assistant
"""
Copyright 2019 Jason Hu <awaregit at gmail.com>
Modified 2020 Matthew Hilton <matthilton2005@gmail.com>
Refactor and Modernised 2025 Matthew Hilton <matthilton2005@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
/*
* Copyright 2026 Kyriakos Georgiopoulos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE
*
* Unless required by applicable law or agreed to in writing, software
@robotdad
robotdad / disabletrustzone.md
Created March 5, 2023 03:30
Disable TrustZone on STM32 boards

Sometimes you need to disable TrustZone on a board to run a sample that isn't configured for it. I've never been able to do that with the interactive STM programmer tool, but these instructions have been pretty solid.

Connect your board. Use the interactive STM32CubeProgrammer to see if the option byte TZEN is enabled. If so run the following steps if you need to disable TrustZone for other demos.

I have seen the need to occasionally reconnect the board between some of these steps. You'll know to do that if you get errors, particularly about an unsupported device.

Run the following commands in a command prompt. Note that the programmer might be under C:\Program Files (x86).

set ST_PROGRAMMER_PATH="C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe"
@OutdoGod
OutdoGod / TaxonomyAcademicDisciplines.txt
Last active March 12, 2026 23:46
Three-tiered Taxonomy of Academic Disciplines
{
"Disciplines": [
{
"name": "Agricultural and Biological Sciences",
"subfields": [
"Agronomy",
"Crop Science",
"Sustainable Agriculture",
"Precision Farming",
"Agroecology",
  • Shall i implement it?
  • No ...
@ossa-ma
ossa-ma / tropes.md
Last active March 12, 2026 23:43
AI Writing Tropes to Avoid — tropes.fyi by ossama.is

AI Writing Tropes to Avoid

Add this file to your AI assistant's system prompt or context to help it avoid common AI writing patterns. Source: tropes.fyi by ossama.is


Word Choice

"Quietly" and Other Magic Adverbs

"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@pmarreck
pmarreck / comparison-of-shells.md
Last active March 12, 2026 23:34
Comparison of Bash, Elvish, NuShell, Murex, es-shell, fish, xonsh, PowerShell, Oil and Ion shells

Comparison of Bash, Elvish, NuShell, Murex, es-shell, fish, xonsh, PowerShell, Oils (Oil/OSH/YSH) and Ion shells

(Originally generated by ChatGPT and reviewed/edited by Claude; now corrected/expanded based on reader feedback. YMMV.)

(generated by chatgpt 4o and reviewed/edited by claude 3.5 sonnet, YMMV)

| Feature | Bash | Elvish | NuShell | Murex | es-shell | Fish | Xonsh | PowerShell | Oil

@chenhunghan
chenhunghan / gist.md
Last active March 12, 2026 23:32
One Prompt to Save 90% Context for Any MCP Server

Local Code Mode for MCP

Most MCP servers just wrap CRUD JSON APIs into tools — I did it too with scim-mcp and garmin-mcp-app. It works, until you realize a tool call dumps 50KB+ into context.

MCP isn't dead — but we need to design MCP tools with the context window in mind.